extends "../cTDW/cTDW.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "野蛮人"
	lv = 2
	attCoe.atkRan = 1
	attCoe.atk = 30 / 8.5 * 2 / 2
	attCoe.maxHp = 700 / 112.5 / 2
	attAdd.suck += 0.1
	attAdd.spd += 0.26
	addSkillTxt("嗜血意志：生命每降低5%，攻速增强20%；吸血+10%")
	if !is_connected("onHurtEnd",self,"run"):
		connect("onHurtEnd",self,"run")

var ucnt:int = 0
func _onBattleStart():
	._onBattleStart()
	ucnt = 0

func run(atkinfo):
	#print(minhp," ",att.hp)
	yield(reTimer(0.02),"timeout")
	var statis = ctrl.getStatisByCha(self)
	var dmg = statis.hurt
	var ncnt = int(dmg / (att.maxHp * 0.05)) 
	if ncnt > ucnt:
		for i in  range(ncnt - ucnt):
			addBuff(SXZY.new(1))
		ucnt = ncnt

class SXZY:
	extends Buff
	var canremove:bool = false
	func _init(lv):
		attInit()
		id = "SXZY"
		att.spd = 0.2